package StringBuffer;

import java.util.Scanner;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class Exercise02 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入价格:>");
        String price  = input.next();
        StringBuffer s1 = new StringBuffer(price);
        int i = s1.lastIndexOf(".");
        while (i - 3 != 0){
            s1 = s1.insert(i - 3, ',');
            i -= 3;
        }
        System.out.println(s1);
    }
}
